﻿using MongoDB.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace Quartz.Service
{
    public interface IQuartzStartup
    {
        /// <summary>
        /// Quartz启动
        /// </summary>
        /// <returns></returns>
        Task Start(CancellationToken cancellationToken);

        /// <summary>
        /// 添加一个定时任务
        /// </summary>
        /// <param name="Task"></param>
        /// <returns></returns>

        Task AddJob(Mongo_TaskManageModel Task);

        /// <summary>
        /// 删除定时任务
        /// </summary>
        /// <param name="guid"></param>
        /// <returns></returns>
        Task DeleteTask(string guid);

        /// <summary>
        /// 暂停定时任务
        /// </summary>
        /// <param name="TaskName"></param>
        /// <returns></returns>
        Task PauseTask(string guid);

        /// <summary>
        /// 恢复定时任务
        /// </summary>
        /// <param name="guid"></param>
        /// <returns></returns>
        Task ResumeTask(string guid);


        /// <summary>
        /// 清除所有的定时任务
        /// </summary>
        /// <returns></returns>
        Task Clear();
    }
}
